# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=jsonnet-bundler
pkgver=0.5.1
pkgrel=12
pkgdesc="Jsonnet package manager"
url="https://github.com/jsonnet-bundler/jsonnet-bundler"
arch="all"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/jsonnet-bundler/jsonnet-bundler/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -o jb -ldflags "-X main.Version=v$pkgver" ./cmd/jb
}

check() {
	go test ./...
}

package() {
	install -Dm755 jb -t "$pkgdir"/usr/bin/
}

sha512sums="
92432998b64571a141f869deaf2f01d65e963fb192db11724238dd178f815829fcf23a2809d2fd04b991530321bcca698cb6b1d4a6cd854336877d46b89b918b  jsonnet-bundler-0.5.1.tar.gz
"
